Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Falcon3 model support #10864

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

mokeddembillel
Copy link
Contributor

Adding Falcon3 model support

@github-actions github-actions bot added the python python script changes label Dec 17, 2024
@ggerganov ggerganov merged commit 382bc7f into ggerganov:master Dec 17, 2024
51 checks passed
slaren added a commit that referenced this pull request Dec 17, 2024
slaren added a commit that referenced this pull request Dec 18, 2024
@slaren
Copy link
Collaborator

slaren commented Dec 18, 2024

@mokeddembillel heads up, this has been reverted because the change to convert_hf_to_gguf.py was creating gguf files with broken tokenizers. This will need to be fixed before it can be added again.

@mokeddembillel
Copy link
Contributor Author

@slaren @ggerganov, Thanks for flagging this. working on fixing it right now.

@mokeddembillel
Copy link
Contributor Author

@slaren @ggerganov Thanks again for flagging this issue.

The issue is that when using meta-llama/Llama-3.1-8B-Instruct the <|begin_of_text|> token is added to every special token when doing token = tokenizer.decode(tokenizer.encode(token))

the screenshot shows before and after token = tokenizer.decode(tokenizer.encode(token))
image

I'm fixing this by adding add_special_tokens=False to tokenizer.encode(). Here is the the result after the fix
image

to be extra safe, we will use token = tokenizer.decode(tokenizer.encode(token)) only if len(token) == 1 so that still fix this issue when \n is econded as Ċ

Generation before the fix:

Prompt: Once upon a time in a land far away,
there was a kingdom ruled by a wise and just king. The kingdom was known for its beauty and prosperity, and the people lived in peace and harmony.ĊĊOne day, a terrible drought struck the land, and the crops began to wither and die. The king, worried about the well-being of his people, called upon his wise council to find a solution. The council, after much deliberation, decided to send a group of brave knights to search for a magical spring that was said to have the power to bring rain to the kingdom.

Generation after the fix:

Prompt: Once upon a time in a land far away,
there was a kingdom ruled by a wise and just king. The kingdom was known for its beauty and prosperity, and the people lived in peace and harmony.

One day, a terrible drought struck the land, and the crops began to wither and die. The king, worried about the well-being of his people, called upon his wise council to find a solution. The council, after much deliberation, decided to send a group of brave knights to search for a magical spring that was said to have the power to bring rain to the kingdom.

Created new PR with the Fix #10883

arthw pushed a commit to arthw/llama.cpp that referenced this pull request Dec 20, 2024
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python python script changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants